package org.example.controller;

import lombok.Data;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
@Data//lombok注解：会自动生成getter/setter/hashcode/equais/toString
public class UserController {

    //需要让Spring容器，帮助我们将容器中的bean对象注入到这个属性
    @Autowired
    private UserService userService;
}
